#ifndef INNER_MSG_H
#define INNER_MSG_H
#include "client_server.h"
#include "msg_relay.h"
#include "server_main.h"
#include "QtCore"
/*
 * 内部传递的消息类
 * 仅在生成和销毁时 new
*/
class Client_Server;
class Inner_Msg:public QObject
{
        Q_OBJECT
public:

    Inner_Msg();
    int now;
    int nowClient;
    QString Msg_Type;
    QVector<Client_Server*> ClientAddress;
    QVector<QString> InfoChain;

    QMap<QString,QString> Data;

    void AddNode(Client_Server* Node);

    void AddNode_Relay();

    void AddNode_SQL();

    void AddNodes(QVector<Client_Server*> &Nodelist);

    void SendToRelay();

    void GetClientByData();

    void PostSQL(Client_Server* client,QString Type,QString Operate);
signals:
    void sig_arrived(Inner_Msg * msg);

};
#endif // INNER_MSG_H
